import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '@/views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView,
      meta: {
        title: '应用广场',
      },
    },
    {
      path: '/generator',
      name: 'generator',
      component: () => import('@/views/GeneratorView.vue'),
      meta: {
        title: '应用生成',
      },
    },
    {
      path: '/my-apps',
      name: 'my-apps',
      component: () => import('@/views/MyAppsView.vue'),
      meta: {
        title: '我的应用',
      },
    },
    {
      path: '/about',
      name: 'about',
      component: () => import('@/views/AboutView.vue'),
      meta: {
        title: '关于',
      },
    },
  ],
})

export default router
